package routers

import (
	"gin-gorm-project/service/user_service"
	"github.com/gin-gonic/gin"
)

func UserRouters(r *gin.Engine) {

	var userService = &user_service.UserService{}
	userRouters := r.Group("/user")

	// 生成测试数据
	userRouters.GET("/buildDemoUser", userService.BuildDemoUser)
	// 查询所有
	userRouters.GET("/queryAll", userService.QueryAll)
	// 分页查询
	userRouters.POST("/queryByPage", userService.QueryByPage)
	// 保存
	userRouters.POST("/save", userService.Save)

}
